<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="utf-8"/>
		<script type="text/javascript" src="/plugins/jquery-1.11.0.min.js"></script>
		<script type="text/javascript" src="/scripts/js.js"></script>
		<title>登陆</title>
		<script type="text/javascript">
			var isrem = getCookie('remember');
            if (isrem == 1) {
                $("#idOrEmail").attr("value", getCookie("username"));
                $("#password").attr("value", getCookie("password"));
                $("#remember").attr("checked", "checked");
             }
	    function refresh(obj) {
	        obj.src = "/verificationCode?"+Math.random();
	    }
	    </script>
	</head>
	<body>
		<div style="width:500px;margin:0 auto;">
			<form action="/login/valid" method = "post">
				<table>
					<th:block th:if="${statMessage != null}">
						<tr><td colspan="2" th:text="${statMessage}">
						</td></tr>
					</th:block>
					<tr>
						<td>ID/Email</td>
						<td><input id="idOrEmail" name="idOrEmail"/></td>
					</tr>
					<tr>
						<td>密码</td>
						<td><input name="password" id="password" type="password"/></td>
					</tr>
					<tr>
						<td>验证码</td>
						<td><input name="checkcode" /><img onclick="javascript:refresh(this);" src="/verificationCode"/></td>
					</tr>
					<tr>
						<td colspan="2"><input type="checkbox" id="remember" value="1" name="rememeber" />记住账号密码</td>
					</tr>
					<tr>
						<td colspan="2"><input type="submit" value="登陆"/></td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>